<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="employee.js"></script>
    <script src="emService.js"></script>
    <style>
        .hidDiv {
            background-color: rgba(255, 0, 0, 0.5);
            left: 0px;
            top: 0px;
            position: absolute;
            visibility: hidden;
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 100%;
        }

        .contentDiv {
            width: 600px;
            height: 400px;
            background-color: olivedrab;
            border: 2px solid black;
        }
    </style>
</head>
<body>
<table border="1" width="80%">
    <thead>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>工资</th>
        <th>性别</th>
        <th>操作</th>
    </tr>

    <tbody id="data"></tbody>
    </thead>
</table>
姓名：<input type="text" id="nameTxt">
<input type="button" value="查找" onclick="findByName()">
<br>
<input type="button" value="添加" onclick="showAddDiv()">
<div class="hidDiv" id="addDiv">
    <div class="contentDiv">
        编号<input type="text" id="codTxt"><br>
        姓名<input type="text" id="emnameTxt"><br>
        金额<input type="text" id="moneyTxt"><br>
        性别<input type="text" id="sexTxt"><br>
        <input type="button" value="确定" onclick="addEmployee()">
    </div>
</div>
<div class="hidDiv" id="updateDiv">
    <div class="contentDiv">
        编号<span id="codSpan"></span><br>
        姓名<span id="nameSpan"></span><br>
        金额<input type="text" id="moneySpan"></span><br>
        性别<span id="sexSpan"></span><br>
        <input type="button" value="确定" onclick="update()">
    </div>
</div>
</body>
</html>